#!/bin/bash
OLDDIR=$PWD
cd "$VIM_FILEDIR"
case "$VIM_FILEEXT" in
    \.c|\.cpp|\.cc|\.cxx)
        "$VIM_FILEDIR/$VIM_FILENOEXT"
        ;;
    \.py|\.pyw)
        cd ${VIM_CWD};python3 "$VIM_FILEPATH"
        ;;
    \.sh)
        bash "$VIM_FILENAME"
        ;;
    *)
        echo "Unexpected file type: $VIM_FILEEXT"
        ;;    
esac
cd "$OLDDIR"
# vim:ft=sh
